package com.ruoyi.ylyx.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.ylyx.domain.YlyxBanner;
import com.ruoyi.ylyx.service.IYlyxBannerService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;

/**
 * 轮播Controller
 *
 */
@Controller
@RequestMapping("/phone/ylyx/banner")
public class YlyxBannerPhoneController extends BaseController
{

    @Autowired
    private IYlyxBannerService ylyxBannerService;

    /**
     * 获取首页轮播
     * @return
     */
    @RequestMapping("/getBanner")
    @ResponseBody
    public AjaxResult getBanner(){
        YlyxBanner banner = new YlyxBanner();
        return success("获取成功", ylyxBannerService.selectYlyxBannerList(banner));

    }
}
